//
//  UISwitch+Chained.m
//  ObjectCChained
//
//  Created by sny on 2018/5/26.
//  Copyright © 2018年 HuangYangYang. All rights reserved.
//

#import "UISwitch+Chained.h"

@implementation UISwitch (Chained)

#pragma mark - getter

- (UISwitch *(^)(UIColor *,UIColor *))chainedSwitchTintColorSet {
    return ^UISwitch *(UIColor *onTintColor,UIColor *tintColor) {
        if (onTintColor) {self.onTintColor = onTintColor;}
        if (tintColor) {self.tintColor = tintColor;}
        return self;
    };
}

- (UISwitch *(^)(UIImage *,UIImage *))chainedSwitchImageSet {
    return ^UISwitch *(UIImage *onImage,UIImage *offImage) {
        if (onImage) {self.onImage = onImage;}
        if (offImage) {self.offImage = offImage;}
        return self;
    };
}


- (UISwitch *(^)(UIColor *))chainedThumbTintColor {
    return ^UISwitch *(UIColor *thumbTintColor) {
        if (thumbTintColor) {self.thumbTintColor = thumbTintColor;}
        return self;
    };
}

- (UISwitch *(^)(BOOL))chainedSwitchOn {
    return ^UISwitch *(BOOL on) {
        self.on = on;
        return self;
    };
}

#pragma mark - setter

- (void)setChainedSwitchTintColorSet:(UISwitch *(^)(UIColor *, UIColor *))chainedSwitchTintColorSet {}

- (void)setChainedSwitchImageSet:(UISwitch *(^)(UIImage *, UIImage *))chainedSwitchImageSet {}

- (void)setChainedThumbTintColor:(UISwitch *(^)(UIColor *))chainedThumbTintColor {}

- (void)setChainedSwitchOn:(UISwitch *(^)(BOOL))chainedSwitchOn {}

@end
